﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Drawing.Design;
using System.ComponentModel.Design;
using UIDesigner.DesignContainers;
using UIDesigner.Designers.Forms;
using System.Windows.Forms;

namespace UIDesigner.Editors
{
    public class SurfaceEditor : UITypeEditor
    {
        public override UITypeEditorEditStyle GetEditStyle(System.ComponentModel.ITypeDescriptorContext context)
        {
            return UITypeEditorEditStyle.Modal;
        }

        public override object EditValue(System.ComponentModel.ITypeDescriptorContext context, IServiceProvider provider, object value)
        {
            frmSurfaceDesigner frm = new frmSurfaceDesigner();

            frm.DesignerHost = (AFDesignerHost) context.Container;

            if (frm.ShowDialog() == DialogResult.OK)
            {

            }

            return base.EditValue(context, provider, value);
        }
    }
}
